Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SECURESIGN-1476 | Add the Redis backfill job to Ansible collection #101

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JasonPowr
Copy link
Contributor

@JasonPowr JasonPowr commented Nov 13, 2024

Pr to add the backfill redis, setting as draft for now as it should only be merged after #100

Upstream pr: sigstore/rekor#2280

@JasonPowr JasonPowr force-pushed the add-backfill-redis-job branch 2 times, most recently from ca2ca28 to e67ba38 Compare November 13, 2024 11:43
@JasonPowr JasonPowr marked this pull request as ready for review November 13, 2024 13:59
@JasonPowr JasonPowr requested review from ritz303 and a team as code owners November 13, 2024 13:59
@SequeI
Copy link
Collaborator

SequeI commented Nov 14, 2024

Additionally, ideally you could add a workable test for this within user_provided just to ensure this new feature works

@JasonPowr
Copy link
Contributor Author

Additionally, ideally you could add a workable test for this within user_provided just to ensure this new feature works

Im not really sure there is a good way to test this if I am honest, ill take a look, but really we would only be testing to make sure that we can configure it with ansible and thats already done here

Copy link
Collaborator

@bkabrda bkabrda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 thanks for the PR Jason. I think this is a very good start, but I put some suggestions inline to improve some of the mechanics of this functionality.

@JasonPowr JasonPowr force-pushed the add-backfill-redis-job branch from 262b902 to e77eed2 Compare December 4, 2024 13:57
@JasonPowr JasonPowr marked this pull request as draft December 4, 2024 13:58
@JasonPowr
Copy link
Contributor Author

Marking as draft until an image with my changes becomes available

@JasonPowr JasonPowr force-pushed the add-backfill-redis-job branch 2 times, most recently from 6a8c099 to 7f85533 Compare December 4, 2024 14:16
@JasonPowr JasonPowr force-pushed the add-backfill-redis-job branch from 7f85533 to 47f2774 Compare December 4, 2024 14:21
Copy link
Collaborator

@bkabrda bkabrda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for putting all the additional work in. This looks really good, I just have one minor comment on the config variable we're introducing.

Also a question: Did you try to see if the timer execution works correctly? (e.g. by modifying the timer locally to execute every minute or something like that to actually see it execute repeatedly)

Thinking about this further, I think we should expose the timer configuration as a variable under tas_single_node_backfill_redis (see my first comment about modifying this variable). This will both allow users to run the job when they want to and allow us to easily test this feature.

@@ -19,6 +19,7 @@ Deploy the [RHTAS](https://docs.redhat.com/en/documentation/red_hat_trusted_arti
|---|---|---|---|
| tas_single_node_podman_network | Name of the Podman network for containers to use. | str | `rhtas` |
| tas_single_node_rekor_redis | Details on the Redis connection for Rekor. You can set this to a custom Redis instance. | dict of 'tas_single_node_rekor_redis' options | `{'database_deploy': True, 'redis': {'host': 'rekor-redis-pod', 'port': 6379, 'password': 'password'}}` |
| tas_single_node_backfill_redis_enabled | Enable or disable the backfill redis job | bool | `True` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this so that it's a dict with keys - right now we would only have

tas_single_node_backfill_redis:
  enabled: true

But in the future, this structure allows us to provide more options for the backfill job and have them grouped together logically in one place.

@JasonPowr
Copy link
Contributor Author

Also a question: Did you try to see if the timer execution works correctly? (e.g. by modifying the timer locally to execute every minute or something like that to actually see it execute repeatedly)

I did yes, everything worked as expected :)

I think we should expose the timer configuration as a variable under tas_single_node_backfill_redis

Makes sense :) sure thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants